package models

import "strings"

func HandleTagsListData(tags []string) map[string]int {
    var tagsMap = make(map[string]int)
    for _, tag := range tags {
        tagList := strings.Split(tag, "&")
        for _, value := range tagList {

            tagsMap[strings.Trim(value," ")]++
        }
    }
    return tagsMap
}